home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / AppMaker 2.0b3 / Demo AppMaker 1.5 / Demo AppMaker™ / Demo AppMaker™.rsrc / TmPT_106_ModalOneShot < prev    next >
Encoding:
Text File  |  1992-04-08  |  1.6 KB  |  81 lines

  1. { %filename% -- Modal dialog}
  2. { Created %date% %time% by AppMaker}
  3.  
  4. {    This module overrides the AppMaker-generated code in z%dlogname%.%        %}
  5. {    It provides a place for you to add your own code and still be able to    }
  6. {    generate code for new changes to the user interface.  This module will    }
  7. {    not be regenerated by AppMaker unless you delete it.  Its superclass,    }
  8. {    z%dlogname%, may be regenerated to handle user interface changes%        %}
  9. {    without losing your hand-coded changes to this module.                    }
  10.  
  11. Unit %unitname%;
  12. Interface
  13.  
  14. Uses
  15.     TCL,
  16.     AMCL,
  17.     %AppName%Intf,
  18.     ResourceDefs;
  19.  
  20. {----------}
  21. Procedure Do%dlogname%    (aSupervisor:    CDirectorOwner);
  22.  
  23. {----------}
  24. Implementation
  25.  
  26. %for each item gen defineItem%
  27.  
  28. {----------}
  29. Procedure Do%dlogname%    (aSupervisor:    CDirectorOwner);
  30. var
  31.     dialog:            C%dlogname%;
  32.     dismisser:        longint;
  33.     fi:                FailInfo;
  34.  
  35.     {----------}
  36.     Procedure HandleFailure    (error:        Integer;
  37.                              message:    Longint);
  38.     Begin
  39.         ForgetObject (dialog);
  40.     End;
  41.  
  42. Begin
  43.     dialog := nil;
  44.     CatchFailures (fi, HandleFailure);
  45.  
  46.     New (dialog);
  47.     dialog.I%dlogname% (aSupervisor);
  48.  
  49.     {initialize dialog panes}
  50.  
  51.     dialog.BeginDialog;
  52.     dismisser := dialog.DoModalDialog (cmdOK);    
  53.  
  54.     if dismisser = cmdOK then begin
  55.         {extract values from dialog panes}
  56.     end;
  57.  
  58.     dialog.Free;
  59.  
  60.     Success;
  61. End; {Do%dlogname%}
  62.  
  63. {----------}
  64. Procedure C%dlogname%.I%dlogname%    (aSupervisor:    CDirectorOwner);
  65. Begin
  66.     inherited IZ%dlogname% (aSupervisor);
  67.  
  68.     {any additional initialization for your dialog}
  69.  
  70. End; {I%dlogname%}
  71.  
  72. {----------}
  73. Procedure C%dlogname%.DoCommand        (theCommand:    longint);
  74. var
  75.     ignore:            boolean;
  76. Begin
  77.     ignore := EndDialog (cmdOK, true);
  78. End; {DoCommand}
  79.     
  80. End. {%unitname%}
  81.